tmpLayersId = [];
/*
    递归，获取当前选择项的所有子节点的ID
*/
addlayers = function(treeNode){
    if (treeNode.items) {
        for(var i = 0; i < treeNode.items.length; i++){
            if(treeNode.items[i].items){
                addlayers(treeNode.items[i]);
            }else{
                tmpLayersId.push(treeNode.items[i].id);
            }
        }
    } else {
        tmpLayersId.push(treeNode.id) 
    }
    return tmpLayersId;
}

